home *** CD-ROM | disk | FTP | other *** search
/ Amiga Games Extra 1996 September / Amiga Games Extra CD-ROM 9-1996.iso / userbox / publicdomain / aplayer / apmlloader.aplay < prev    next >
Text File  |  1995-02-12  |  3KB  |  76 lines

  1. /*********************************************************************
  2.                      APlayer StartUp APML Loader
  3.  
  4.          $VER: APlayer StartUp APML Loader 1.0.0 (09-Feb-95)
  5.  
  6.                    Done in 1995 by KiLLraVeN/MYSTiC
  7.  
  8.                 This script may be freely distributed.
  9.  
  10.     This  little  script  was  made  as a startup-script for the
  11.     wonderful  AccessiblePlayer  by Thomas Neumann.  It will pop
  12.     up  a  ReqTools  file-requester  and  allows you to select a
  13.     .apml file (APlayer Module List) and will start playing it.
  14.  
  15.     Optionable  you  can  have  it shuffle the list before it is
  16.     played and you can have it iconify APlayer after loading the
  17.     script.   By  default  the 1st module in the (shuffled) list
  18.     will  be  played, you can override this so it will not start
  19.     to  play.   To set these options, check the variables at the
  20.     beginning of this ARexx script.
  21.  
  22.     Many thanks to  : Thomas Neumann for programming APlayer.
  23.                       Asger Høgsted for putting up with me ;)
  24.  
  25.     Acknowledgements: RexxReqTools is ) 1992-1994 Rafael D'Hallewey
  26.                       ReqTools is ) 1991-1994 Nico Frangois
  27.                       AccessiblePlayer is ) 1994-1995 Thomas Neumann
  28.  
  29. **********************************************************************
  30.  
  31.     NOTE:   If  you  use the tooltype MODULELIST in your APlayer
  32.     icon,  APlayer  will  load  that  list first, play the first
  33.     module  in  that  list  and  then  this ARexx script will be
  34.     started.   So  it's  better  you comment the tooltype out in
  35.     your icon.
  36.  
  37. *********************************************************************/
  38.  
  39. /* Start of the Script */
  40.  
  41. path           = 'Music:Scripts'    /* PATH TO YOUR .APML FiLES  */
  42. shuffle_list   = 'No'               /* SHUFFLE LiST BEFORE PLAY? */
  43. iconify_player = 'No'               /* iCONiFY PLAYER?           */
  44. start_module   = 'Yes'              /* START PLAYiNG?            */
  45.  
  46. /* Open the RexxReqTools library */
  47. call addlib("rexxreqtools.library", 0, -30, 0)
  48.  
  49. /* Let's talk to APlayer */
  50. address APLAYER
  51. options results
  52.  
  53. /* Which list do you wish to load? */
  54. filename = rtfilerequest(, , "Please select an APML file..." , ,"rtfi_initialpath="path "rtfi_matchpat=#?.apml" "rtfi_buffer = true")
  55.  
  56. /* Did you select a file? */
  57. if rtresult ~= 0 then
  58.    loadlist filename
  59.  
  60.    /* Shuffle the list ? */
  61.    if shuffle_list ~= 'No' then
  62.       Shuffle
  63.    endif
  64.  
  65.    /* Should we iconify APlayer? */
  66.    if iconify_player ~= 'No' then
  67.       Iconify
  68.    endif
  69.  
  70.    /* Start the first module ? */
  71.    if start_module == 'Yes' then
  72.       playmod 1
  73.    endif
  74.  
  75. endif
  76.